home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-06-03 | 52.0 KB | 1,571 lines |
- C.S.M.P. Digest Sun, 08 Mar 92 Volume 1 : Issue 7
-
- Today's Topics:
-
- ? XVT Questions
- o please help me find Think Pascal TCL examples
- Compressed resources in ResEdit 2.1.1?
- Public Domain C/C++ compilers?
- Need Programmer Switch on IIsi
- Mac Program, which program flow ?
- Init Benchmark Shareware Location
- C code for restarting the Finder
- Posting a notification with buttons?
- MoveControl within dialog box.
- Unloading Member Function Revisited (long)
- Does the SCSI Manager support devices that disconnect?
- Microsoft word format question
- Sun .au format -> Mac sound format software?
- Alternate LAP support under MacTCP 1.1
- Hiding Folders in Think C - again
- Think C 5.0 bug ?
- system calls
- ThinkC TCL Printer problem - too many strips
-
-
- The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
-
- These digests are available (by using FTP, account anonymous, your email
- address as password) in the pub/mac directory on ftp.cs.uoregon.edu.
- This is also the home of the comp.sys.mac.programmer Frequently Asked
- Questions list.
-
- The articles in these digests are taken directly from comp.sys.mac.programmer.
- They are not edited; all articles included in this digest are in their original
- posted form. The only articles that are -not- included in these digests are
- those which didn't receive any replies (except those that give information
- rather than ask a question). All replies to each article are concatenated
- onto the original article in the order in which they were received. Article
- threads are not added to the digests until the last article added to the
- thread is at least one month old (this is to ensure that the thread is dead
- before adding it to the digests).
-
- Send administrative mail to mkelly@cs.uoregon.edu.
-
- -------------------------------------------------------
-
- From: CHARLESW@QUCDN.QueensU.CA
- Subject: ? XVT Questions
- Date: 30 Jan 92 03:59:11 GMT
- Organization: Queen's University at Kingston
-
-
- Could someone please send me contact info for the company that produces
- XVT?
-
- While I'm here, a couple of questions for those who've used it:
-
- 1) How does XVT handle dialogs on character-based systems?
- 2) Does XVT handle MOTIF and char-based systems for VMS-based VAXes? (I'm
- thinking of XVT for a project with Oracle that has users accessing data
- from VTxxx terminals, VAXstations, Macs, MS-DOS and Windows PCs. The
- main alternative seems to be SQL*Forms.)
- 3) How do you handle documentation for the different platforms? Is it
- reasonable to do a single document in something like FrameMaker with
- examples and diagrams selected for printing based on the platform you're
- describing?
-
- Thanks for any advice you can offer (those are pretty broad questions).
-
- .../dave
-
- Dave Charlesworth
-
-
-
- - -------------------------
-
- From: stephenm@syacus.acus.oz.au (Stephen McIntosh)
- Subject: ? XVT Questions
- Date: 1 Feb 92 12:32:14 GMT
- Organization: ACUS Australian Centre for Unisys Software, Sydney
-
- CHARLESW@QUCDN.QueensU.CA writes:
- > Could someone please send me contact info for the company that produces XVT?
- > How does XVT handle dialogs on character-based systems?
-
- Beware of trying to emulate a GUI environment in a text scenario.
- Other more important points are colour support, native OS help,
- MDI (Windows 3.0, Excel and Word, etc) and other specific features that may
- not be supported directly through the tool(s) that you may choose.
-
- Suggest prototyping your final system then evaluate a tool(s) VERY VERY wisely
- before development begins.
-
- Regards
- Stephen McIntosh
- --
- Sincerely
- Stephen McIntosh
- ACUS-The Australian Centre for UNISYS software
- Phone: +61-2-390-1371 | ACSnet: stephenm@syacus.OZ
-
-
-
- ---------------------------
-
- From: jasper@geriatrix.cs.uoregon.edu (Jon Barber)
- Subject: o please help me find Think Pascal TCL examples
- Organization: University of Oregon Computer and Information Sciences Dept.
- Date: Fri, 31 Jan 1992 20:29:36 GMT
-
- Can anyone O Please help me find Think Pascal 4.0 with TCL
- programs with source code listings?
-
- Is there a FTP site? A digest? Does anyone have a good
- library of code they use for development?
-
- I'm developing software to teach biology concepts for the
- biology dept here, and while I'm an experienced programmer,
- I'm basically in my second month of Macintosh programming.
- Examples are the way to go, to learn stuff, but just
- rooting around in the Art Class project doesn't answer
- very many questions.
-
- Actually, the code could really be in any language - I'm
- just hoping to gain greater insight into Mac programming
- techniques.
-
- By helping me you will be making the world a much better
- place (for introductory biology students, anyway).
-
- Thanks in advance
-
- <jasper>
-
-
-
- - -------------------------
-
- From: 881571s@aucs.acadiau.ca (Arnold Spence)
- Subject: o please help me find Think Pascal TCL examples
- Date: 4 Feb 92 17:34:48 GMT
- Organization: Acadia University
-
- I posted a similar request 2 months ago and the only response I got was email
- from a couple of people looking for the same thing. I believe that if anyone
- can assist, there will be many that will appreciate it.
-
- if end_of_message then
- writeln('Arnold B. Spence : 881571s@aucs.acadiau.ca');
-
-
-
- ---------------------------
-
- From: dwood@zia.aoc.nrao.edu (Doug Wood)
- Subject: Compressed resources in ResEdit 2.1.1?
- Organization: National Radio Astronomy Observatory, Socorro NM
- Date: Fri, 31 Jan 92 17:00:05 GMT
-
- The Get Info window for a resource in ResEdit (2.1.1) has
- a check box that says "Compressed". This option does not
- appear in Apple's "ResEdit Reference" manual (p.20).
- When I click the option, however, it refuses to be checked.
-
- Can someone explain this feature? Does it work? Can I use
- it to compress PICT data in resources to reduce the disk
- space used by my application?
-
- Thanks!
-
- Doug Wood
- dwood@nrao.edu
-
-
-
- - -------------------------
-
- From: alana@sisters.cs.uoregon.edu (Thomas Alan Akins)
- Subject: Compressed resources in ResEdit 2.1.1?
- Organization: /local/lib/rn/organization
- Date: Sat, 1 Feb 1992 07:42:59 GMT
-
- Regarding compressed resources in ResEdit:
-
- I believe, like the "Resource Map is Read Only" and "File Protect"
- and "File Busy" check boxes that can be found under the "Get Info..." File
- Menu, that the "Compressed" check box cannot be changed from ResEdit. It is
- merely informational (from ResEdit, at least).
-
- --
- * Alan Akins *
- * "I could say 'addition' alana@cs.uoregon.edu *
- * when I mean ... 'basketball.'" University of Oregon *
- * - E. Tick Department of Computer Science *
-
-
-
- - -------------------------
-
- From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
- Subject: Compressed resources in ResEdit 2.1.1?
- Date: 31 Jan 92 20:59:32 GMT
- Organization: Kalamazoo College
-
- dwood@zia.aoc.nrao.edu (Doug Wood) writes:
- >The Get Info window for a resource in ResEdit (2.1.1) has
- >a check box that says "Compressed". This option does not
- >appear in Apple's "ResEdit Reference" manual (p.20).
- >When I click the option, however, it refuses to be checked.
- >
- >Can someone explain this feature? Does it work? Can I use
- >it to compress PICT data in resources to reduce the disk
- >space used by my application?
-
- Alas, no. To reduce System 7's footprint, Apple developed their own
- compression and expansion code, and bundled it with the Resource
- Manager. Compressed resources are automatically decompressed when
- they're opened. (Try opening one in ResEdit, it'll warn you.)
-
- But Apple isn't releasing the compression code until it's firmed up and
- solid and ready to be used; unfortunately, it's been almost a year and
- there's no sign of it. So you can look but you can't touch.
- --
- Jamie McCarthy Internet: k044477@kzoo.edu AppleLink: j.mccarthy
- Kzoo randomly kills all my mail; if I don't acknowledge, try resending.
-
-
-
- ---------------------------
-
- From: sheldon@kong.gsfc.nasa.gov (Roger Sheldon - AISS)
- Subject: Public Domain C/C++ compilers?
- Date: 31 Jan 92 16:51:09 GMT
- Organization: Goddard Space Flight Center
-
- This is probably an FAQ. What public domain C++ (or just C) compilers
- are available for a mac without AU/X?
-
- Thanks,
-
- Roger Sheldon sheldon@kong.gsfc.nasa.gov
-
-
-
- - -------------------------
-
- From: e-sink@uiuc.edu (Eric W. Sink)
- Subject: Public Domain C/C++ compilers?
- Date: 31 Jan 92 18:58:35 GMT
- Organization: University of Illinois at Urbana-Champaign
-
- In <1992Jan31.165109.14807@kong.gsfc.nasa.gov> sheldon@kong.gsfc.nasa.gov (Roger Sheldon - AISS) writes:
-
- >This is probably an FAQ. What public domain C++ (or just C) compilers
- >are available for a mac without AU/X?
-
- There are no public domain C or C++ compilers for the Mac (that I am aware
- of). In the closely related category of freely distributable, there are
- no C++ offerings either, but there are a few C compilers:
-
- 1. GNU C. This product is under the terms of the GNU Public License,
- and runs only under MPW. Requires the MPW includes and libraries,
- as well as the MPW Assembler. Awesome compiler.
-
- 2. Sesame C. A shareware compiler which handles a subset of C. Has
- been out for some time, and I have never seen an update.
-
- 3. Harvest C. I'm the author of this one. It is shareware right now.
- Compiles all of ANSI C, most MPW extensions. Requires the MPW
- includes and libraries. Slow, poor user interface. New version
- is in the works, and it will no longer be shareware.
-
- --
- Eric W. Sink, Spatial Analysis and Systems Team
- USACERL, P.O. Box 9005, Champaign, IL 61826-9005
- 1-800-USA-CERL x449, e-sink@uiuc.edu
-
-
-
- ---------------------------
-
- From: chrism@col.hp.com (Chris Magnuson)
- Date: Sat, 1 Feb 1992 00:25:45 GMT
- Subject: Need Programmer Switch on IIsi
- Organization: HP Colorado Springs Division
-
- Anyone figured out how to get the equivalent of a programmer's switch (like
- the SE has) on a Mac IIsi. I really miss that little switch.
-
- Thanks,
- chrism@col.hp.com
-
-
-
- - -------------------------
-
- From: greeny@top.cis.syr.edu (Jonathan Greenfield)
- Subject: Need Programmer Switch on IIsi
- Date: 1 Feb 92 04:56:00 GMT
- Organization: CIS Dept., Syracuse University
-
- In article <65790007@col.hp.com> chrism@col.hp.com (Chris Magnuson) writes:
- >Anyone figured out how to get the equivalent of a programmer's switch (like
- >the SE has) on a Mac IIsi. I really miss that little switch.
-
- For an LC it's Control-Command-Reset.
-
- Interrupt (for use with debuggers) is Command-Reset.
-
- (This is from "Special Features of Your Macintosh LC." Try checking the
- equivalent for your IIsi if these don't work.)
-
- --
- greeny greeny@top.cis.syr.edu
-
- "What's the difference between an orange?"
-
-
-
- - -------------------------
-
- From: chrism@col.hp.com (Chris Magnuson)
- Subject: Need Programmer Switch on IIsi
- Date: 2 Feb 92 07:38:32 GMT
- Organization: HP Colorado Springs Division
-
- HHmm. Guess I shoulda read them manuals...
-
-
-
- ---------------------------
-
- From: pope@daimi.aau.dk (Povl Hessellund Pedersen)
- Subject: Mac Program, which program flow ?
- Date: 1 Feb 92 12:33:07 GMT
- Organization: DAIMI: Computer Science Department, Aarhus University, Denmark
-
- I am going to write a mac application, which
- among other thing will support at least 3 different
- windows somehow representing the same data in a few
- ways, but they will be quite different.
-
- My question is, how should I build up the program ?
- I could use one event-loop, or I could write an independent
- event loop for each window type. In both cases I see
- some minor problems when switching from one window
- to another very different one. Menus will also have
- to be handled different depending on the fron window.
-
- Any good ideas / advice ?
- --
- Povl H. Pedersen (External student at dept. of CS, student at dept. economics)
- Macintosh programmer, consultant and technical support
- eco861771@ecostat.aau.dk / pope@daimi.aau.dk
-
-
-
- - -------------------------
-
- From: re00+@andrew.cmu.edu (Robert H Earhart)
- Subject: Mac Program, which program flow ?
- Date: 1 Feb 92 17:35:18 GMT
- Organization: Freshman, MCS general, Carnegie Mellon, Pittsburgh, PA
-
-
- I've always handled that by using one event loop, testing update
- events to see which window I should be drawing in and jumping to the
- appropriate draw routine, and upon an activate event sending myself an
- application defined event (although under system Seven Apple events
- work nicely...) that activates the a function from the event loop to
- calculate which menus should be hilighted, highlites them, and purges
- all other updateMenu events...
-
- -Rob
-
-
-
- - -------------------------
-
- From: ABSURD@applelink.apple.com (Tim Dierks, ToyMeister, Cray abuser)
- Subject: Mac Program, which program flow ?
- Date: 4 Feb 92 20:55:52 GMT
- Organization: MacDTS, Apple Computer
-
- In article <1992Feb1.123307.14614@daimi.aau.dk>, pope@daimi.aau.dk (Povl Hessellund Pedersen) writes:
- >
- > I am going to write a mac application, which
- > among other thing will support at least 3 different
- > windows somehow representing the same data in a few
- > ways, but they will be quite different.
- >
- > My question is, how should I build up the program ?
- > I could use one event-loop, or I could write an independent
- > event loop for each window type. In both cases I see
- > some minor problems when switching from one window
- > to another very different one. Menus will also have
- > to be handled different depending on the fron window.
- >
- > Any good ideas / advice ?
-
- I strongly recommend that people keep the number of event loops they have to
- the smallest number possible. When you've got to deal with stuff like AppleEvents
- and other things, you need to be as non-modal as possible, and that includes
- your internal code structure. If you need to implement shockingly different
- behavior for a number of windows, it's best to decide precisely what kind of
- things will change, and implement them as functions which you access through
- function pointers stored in a record pointed to by the windows refCon. This
- way, if something happens (such as an update event), all you have to do is
- take the appropriate window pointer, look in the refCon, fetch the appropriate
- function pointer, and call it. This is a lot easier to maintain and change
- than a system based on big case statements for different kinds of windows,
- or having seperate event loops for seperate modes of your program.
-
- Tim Dierks
- MacDTS, but I speak for myself
-
-
-
- ---------------------------
-
- From: braun-eric@CS.YALE.EDU (Eric E. Braun)
- Subject: Init Benchmark Shareware Location
- Date: 1 Feb 92 21:15:56 GMT
- Organization: Yale University Computer Science Dept., New Haven, CT 06520-2158
-
- Howdy,
- Could somebody please point me to an ftp site where I can pick up an
- init benchmarker (like Speedometer 2.0)?
-
- Thanks, Eric
-
-
-
- - -------------------------
-
- From: jquejada@isis.cs.du.edu (Joel Quejada)
- Subject: Init Benchmark Shareware Location
- Date: 2 Feb 92 02:03:26 GMT
- Organization: Nyx, Public Access Unix at U. of Denver Math/CS dept.
-
- In article <1992Feb1.211556.11871@cs.yale.edu> braun-eric@CS.YALE.EDU (Er
- c E. Braun) writes:
- >Howdy,
- >Could somebody please point me to an ftp site where I can pick up an
- >init benchmarker (like Speedometer 2.0)?
- >
- >Thanks, Eric
-
-
- I'm not sure if they have Speedometer 2.0 but they sure have a large
- selection of Mac shareware/PD stuff. The addresses is
- sumex-aim.stanford.edu. Once you're on, cd over to the info-mac
- directory.
-
- Hope this helps!
-
- -Joel Quejada
- jaq@bilbo.baylor.edu
-
-
-
- ---------------------------
-
- From: engber@ils.nwu.edu (Mike Engber)
- Subject: C code for restarting the Finder
- Date: 2 Feb 92 03:05:27 GMT
- Organization: The Institute for the Learning Sciences
-
-
- I've been playing around with killing and restarting the Finder (and trying
- to wreak as little havoc as possible in the process)
-
- I've made a few discoveries, and raised a few.
-
- Attached is THINK C code which I'm currently using with good result.
- So far, it seems to work pretty well. If anyone has any suggestions
- for improvements, esp ones that will make it safer, please let me
- know.
-
- Basically what goes on:
-
- - get the process serial# & FSpec of the current Finder
-
- - get the process serial# & FSpec of the File Sharing Extension
-
- - if the File Sharing Extension is around, send it a quit Apple Event.
- Emperically, I discoverd you'd better not wait for a reply to the
- quit AE or you end up hanging. Why? I don't know. Anyone care to comment?
-
- - Send a quit AE to the Finder, here I've found I need to wait for a reply.
-
- - Launch the Finder
-
- - Wait for the Finder to become the front process. It seems if your app
- is the only one running and it quits too soon, you'll get system error 41.
- This is a weird one, I have no explanation. The Finder shows up as a
- running process according the Process Mangager, but I assume it's not
- yet fully loaded/initialized - so you need to wait a bit before quitting.
- Waiting for it to become the front process was the simplest method I
- came up with for deciding when it was safe to quit. If anyone can shed
- more light on this, please do.
-
- This last step was a pretty tricky one. Since I normally have DarkSide running
- I never discovered the problem myself. Plus, you'd think that having many
- apps running is the hard test case to pass. One program that has this bug is
- Finder Edit, try running it as the only app - bomb.
-
- Anyway here's the code. The only function you need to export is RestartFinder.
-
- -ME
-
- - -
-
- /*
- * Restarting the Finder - written in THNIK C 5.0
- */
-
- #include <AppleEvents.h>
-
- /* Looks through running processes for one with the specified type and signature.
- * Passes back the its ProcessSerialNumber & FSSpec.
- */
- static OSErr FindProcess(OSType processType, OSType processSig, ProcessSerialNumberPtr psn_p, FSSpecPtr spec_p){
- ProcessInfoRec pinfo;
- pinfo.processName = NULL;
- pinfo.processInfoLength = sizeof(pinfo);
- pinfo.processAppSpec = spec_p;
-
- psn_p->highLongOfPSN = 0;
- psn_p->lowLongOfPSN = kNoProcess;
-
- while(!GetNextProcess(psn_p)){
- if(!GetProcessInformation(psn_p,&pinfo) &&
- pinfo.processType == processType &&
- pinfo.processSignature == processSig){
- return noErr;
- }
- }
- return -1;
- }
-
- /* Sends the specified process a quit AE.
- */
- static OSErr QuitProcess(ProcessSerialNumberPtr psn_p, Boolean wait){
- OSErr err;
- AppleEvent ae;
- AppleEvent aeReply;
- AEAddressDesc aeAddr;
-
- if(err=AECreateDesc(typeProcessSerialNumber,(Ptr)psn_p,sizeof(ProcessSerialNumber),&aeAddr)) return err;
- if(err=AECreateAppleEvent(kCoreEventClass,kAEQuitApplication,&aeAddr,0,kAnyTransactionID,&ae)){
- AEDisposeDesc(&aeAddr);
- return err;
- }
- err = AESend(&ae,&aeReply,wait?kAEWaitReply:kAENoReply,kAENormalPriority,kNoTimeOut,NULL,NULL);
- AEDisposeDesc(&ae);
- AEDisposeDesc(&aeAddr);
- AEDisposeDesc(&aeReply);
- return err;
- }
-
-
- /* Passes back the Finder's ProcessSerialNumber & FSSpec. */
- static OSErr FindFinder(ProcessSerialNumberPtr psn_p, FSSpecPtr spec_p){
- return FindProcess('FNDR','MACS',psn_p,spec_p);
- }
-
- /* Passes back the File Sharing Extension's ProcessSerialNumber. */
- static OSErr FindFileShareExt(ProcessSerialNumberPtr psn_p){
- FSSpec danQuayle;
- return FindProcess('INIT','hhgg',psn_p,&danQuayle);
- }
-
-
-
- /* Sends the Finder a quit AE.
- * Passes back the Finder's FSSpec for re-Launching it.
- */
- static OSErr QuitFinder(FSSpecPtr finderSpec_p){
- OSErr err;
- ProcessSerialNumber finderPsn;
- ProcessSerialNumber fSharePsn;
-
- if(err=FindFinder(&finderPsn,finderSpec_p)) return err;
-
- /* find & quit the File Sharing Extension */
- if(!FindFileShareExt(&fSharePsn)){
- if(err=QuitProcess(&fSharePsn,false)) return err;
- }
-
- /* now quit the Finder */
- return QuitProcess(&finderPsn,true);
- }
-
-
- /* Launches the Finder */
- static OSErr LaunchFinder(FSSpecPtr finderSpec_p){
- LaunchParamBlockRec pb;
- pb.launchBlockID = extendedBlock;
- pb.launchEPBLength = extendedBlockLen;
- pb.launchControlFlags = launchContinue + launchNoFileFlags;
- pb.launchAppSpec = finderSpec_p;
- pb.launchAppParameters = NULL;
-
- return LaunchApplication(&pb);
- }
-
-
- OSErr RestartFinder(void){
- OSErr err;
- FSSpec finderSpec;
-
- if(err=QuitFinder(&finderSpec)) return err;
- if(err=LaunchFinder(&finderSpec)) return err;
-
- /* Wait until we're not the FrontProcess, else we may ExitToShell before the Finder
- * has fully restarted - which causes system error 41 if we are the only app running.
- * Why this is, I don't know, but this seems to solve the problem.
- *
- * Note: we launch the finder without the launchDontSwitch flag set, so it will become
- * the front process eventually (else we'd sit around looping till the user decided
- * to click somewhere and activate the Finder)
- */
- {
- FSSpec spec;
- Boolean meFront = true;
- EventRecord curEvent;
- ProcessSerialNumber psn;
- ProcessSerialNumber myPsn;
-
- if(err=GetCurrentProcess(&myPsn)) return err;
-
- while(meFront){
- WaitNextEvent(everyEvent,&curEvent,15L,0L);
- if(err=GetFrontProcess(&psn)) return err;
- if(err=SameProcess(&psn,&myPsn,&meFront)) return err;
- }
- }
- return noErr;
- }
-
-
-
- - -------------------------
-
- From: grobbins@Apple.COM (Grobbins)
- Subject: C code for restarting the Finder
- Date: 2 Feb 92 09:53:11 GMT
- Organization: Apple DTS
-
- In article <1992Feb2.030527.5817@ils.nwu.edu> engber@ils.nwu.edu (Mike Engber) writes:
- > - Send a quit AE to the Finder, here I've found I need to wait for a reply.
-
- Remember that launching and sending Apple events actually happen only
- at WaitNextEvent time. You don't really need to wait for a reply
- from the Finder; it certainly has little to say in response to a
- Quit event. You _do_ need to call WNE, which is what kAEWaitReply
- is doing for you (Inside Mac VI, page 6-60).
-
-
- Grobbins grobbins@apple.com
-
-
-
- ---------------------------
-
- From: peter@cujo.curtin.edu.au (Peter N Lewis)
- Subject: Posting a notification with buttons?
- Organization: NCRPDA, Curtin University
- Date: Sun, 2 Feb 1992 08:09:26 GMT
-
-
- Hi All,
-
- Anyone got any ideas how to do this? I've got a background only application,
- that I want to leave running all the time. When it gets a message from
- another machine I want it to put up a notification to tell the user
- to run the foreground UI for the program. I can do that easy enough
- using the notification manager with a string ptr. But what I'd like
- to be able to put up a notification with two buttons, "OK", and "Launch"
- and if the user clicks launch get my program to automagically launch
- the UI program. I can't see anyway to do this. I don't think using
- a notification proc will work, since I won't be able to put up an
- alert from there, or get at my resources (will I?).
-
- Another point, how can I make the alert go away after say 5 minutes if
- the user hasn't OKed it? If I go NMRemove, will that take down the alert?
- (Sorry, I don't have IM6, and the technotes still aren't on ftp.apple.com
- except in stack format)-:
-
- Anyone have any ideas how I could do this? TIA,
- Peter.
- ______________________________________________________________________
- Peter N Lewis, NCRPDA, Curtin University peter@cujo.curtin.edu.au
- GPO Box U1987, Perth WA 6001, AUSTRALIA FAX: +61 9 367 8141
-
-
-
-
-
- - -------------------------
-
- From: keith@Apple.COM (Keith Rollin)
- Subject: Posting a notification with buttons?
- Date: 3 Feb 92 03:23:20 GMT
- Organization: Apple Computer Inc., Cupertino, CA
-
- In article <1992Feb2.080926.14800@cujo.curtin.edu.au> peter@cujo.curtin.edu.au (Peter N Lewis) writes:
- >
- >Anyone got any ideas how to do this? I've got a background only application,
- >that I want to leave running all the time. When it gets a message from
- >another machine I want it to put up a notification to tell the user
- >to run the foreground UI for the program. I can do that easy enough
- >using the notification manager with a string ptr. But what I'd like
- >to be able to put up a notification with two buttons, "OK", and "Launch"
- >and if the user clicks launch get my program to automagically launch
- >the UI program. I can't see anyway to do this. I don't think using
- >a notification proc will work, since I won't be able to put up an
- >alert from there, or get at my resources (will I?).
- >
- >Another point, how can I make the alert go away after say 5 minutes if
- >the user hasn't OKed it? If I go NMRemove, will that take down the alert?
-
- You might be able to do this by installing a driver, and waking it up
- with a control call. The next time the driver gets called at dNeedsTime
- time, put up your own window. I think this is what AppleShare does when
- it displays its "That server just vanished" alert, but that's only a
- guess.
-
- --
- - ----------------------------------------------------------------------------
- Keith Rollin --- <Taligent .signature under construction>
- Disclaimer: Pretty soon, I really _won't_ be speaking for Apple...
-
-
-
- - -------------------------
-
- From: lsr@Apple.COM (Larry Rosenstein)
- Subject: Posting a notification with buttons?
- Date: 4 Feb 92 21:53:18 GMT
- Organization: Object Based Systems, Apple Computer, Inc.
-
- In article <1992Feb2.080926.14800@cujo.curtin.edu.au> peter@cujo.curtin.edu.au (Peter N Lewis) writes:
- >
- >the UI program. I can't see anyway to do this. I don't think using
- >a notification proc will work, since I won't be able to put up an
- >alert from there, or get at my resources (will I?).
-
- You can't be sure of getting at your resources because the notification can
- occur within any application.
-
- Other than that problem, I think that a notification proc could bring up a
- more complicated dialog, although the human interface guidelines discourages
- this.
-
- --
- Larry Rosenstein, Apple Computer, Inc.
-
- lsr@apple.com
- (or AppleLink: Rosenstein1)
-
-
-
- ---------------------------
-
- From: jesjones@milton.u.washington.edu (Jesse Jones)
- Subject: MoveControl within dialog box.
- Date: 2 Feb 92 19:22:41 GMT
- Organization: University of Washington, Seattle
-
-
- Has anyone here tried to move controls inside a dialog around? I'm trying to
- implement a convolution kernel editor. The kernels can be different sizes so
- I change the dialog windows size and move a few buttons to match the new window
- size. However after the buttons are moved they no longer respond to mouse clicks
- Any ideas? I also tried leaving the window size alone and moving just one button
- with the same results.
-
- In case anyone is wondering I get the control handle for the button using
- GetDItem and move the button with MoveControl. This is all done before Modal-
- Dialog is called.
-
- --Jesse
-
-
-
- - -------------------------
-
- From: dougm@descartes.cns.caltech.edu (Doug McNaught)
- Subject: MoveControl within dialog box.
- Date: 2 Feb 92 23:15:02 GMT
- Organization: California Institute of Technology
-
- In article <1992Feb2.192241.2443@milton.u.washington.edu> jesjones@milton.u.washington.edu (Jesse Jones) writes:
- >
- > In case anyone is wondering I get the control handle for the button using
- >GetDItem and move the button with MoveControl. This is all done before Modal-
- >Dialog is called.
-
- Why don't you try GetDItem/change item rect/SetDItem instead. I think the
- Dialog Manager does its own hit-testing instead of calling FindControl, so
- it's still using the old rects.
- -doug
-
-
- --
- <><><><><><><><><><><><><><><>Go Skins!!<><><><><><><><><><><><><><><><>
- <> Doug McNaught dougm@descartes.caltech.edu <>
- <> Legalize it / Don't criticize it --- Peter Tosh <>
- <><><><><><><><><><><><><><><>Go Skins!!<><><><><><><><><><><><><><><><>
-
-
-
- - -------------------------
-
- From: gurhs@uniwa.uwa.oz.au (Rhys Hollow)
- Subject: MoveControl within dialog box.
- Date: 3 Feb 92 02:58:27 GMT
- Organization: University of Western Australia
-
- dougm@descartes.cns.caltech.edu (Doug McNaught) writes:
-
- >In article <1992Feb2.192241.2443@milton.u.washington.edu> jesjones@milton.u.washington.edu (Jesse Jones) writes:
- >>
- >> In case anyone is wondering I get the control handle for the button using
- >>GetDItem and move the button with MoveControl.
-
- > Why don't you try GetDItem/change item rect/SetDItem instead.
-
-
- - -------------------------
-
-
- Rhys. (in a raving mood)
- - -----------------------------------------------------------------------------
- Rhys Hollow (gurhs@uniwa.uwa.oz.au) "ee'er by gum he's a bad'un!" -DangerMouse.
-
-
-
- - -------------------------
-
- From: keith@Apple.COM (Keith Rollin)
- Subject: MoveControl within dialog box.
- Date: 3 Feb 92 03:24:54 GMT
- Organization: Apple Computer Inc., Cupertino, CA
-
- In article <1992Feb2.231502.11377@cco.caltech.edu> dougm@descartes.cns.caltech.edu (Doug McNaught) writes:
- >In article <1992Feb2.192241.2443@milton.u.washington.edu> jesjones@milton.u.washington.edu (Jesse Jones) writes:
- >>
- >> In case anyone is wondering I get the control handle for the button using
- >>GetDItem and move the button with MoveControl. This is all done before Modal-
- >>Dialog is called.
- >
- > Why don't you try GetDItem/change item rect/SetDItem instead. I think the
- >Dialog Manager does its own hit-testing instead of calling FindControl, so
- >it's still using the old rects.
-
- Changing the rectangle of the dialog item should not be used "instead". When
- moving a dialog item that is also a control, both SetDItem and MoveControl
- need to be used.
-
- --
- - ----------------------------------------------------------------------------
- Keith Rollin --- <Taligent .signature under construction>
- Disclaimer: Pretty soon, I really _won't_ be speaking for Apple...
-
-
-
- - -------------------------
-
- From: felciano@medisg.stanford.edu (Ramon Felciano)
- Subject: MoveControl within dialog box.
- Date: 3 Feb 92 21:15:16 GMT
- Organization: SUMMIT, Stanford U. Medical Media & Information Technologies
-
- In article <1992Feb3.025827.4246@uniwa.uwa.oz.au>, gurhs@uniwa.uwa.oz.au (Rhys Hollow) writes:
- >
- > dougm@descartes.cns.caltech.edu (Doug McNaught) writes:
- >
- [...]
- > From MY experience, I have found that you have to do both! Set the
- > item rect, AND move the control with MoveControl. It's all very
- > confusing. Another annoying thing is the way it erases the old position
- > of the button at VERY awkward and visually unpleasant times.
- > What I think would be nice is a new Dialog Manager. Dialog Manager
- > coupled with ResEdit is the closest thing we have to Interface Builder,
- > however the Operating system end of things falls down if you try to
- > anything useful with it. Ho hum, heavy sigh.
- >
- > Rhys Hollow (gurhs@uniwa.uwa.oz.au) "ee'er by gum he's a bad'un!" -DangerMouse.
- >
- Hear, hear! This ugly programming necessity had me stumped for WEEKS! That along
- with the fact that useritems like a default button HAD TO BE A SEPARATE ITEM FROM
- THE ACTUAL BUTTON!
-
- Yaargh!
-
- Ramon
-
-
-
- - -------------------------
-
- From: jesjones@milton.u.washington.edu (Jesse Jones)
- Subject: MoveControl within dialog box.
- Organization: University of Washington, Seattle
- Date: Mon, 3 Feb 1992 22:45:50 GMT
-
- Thanks for the tip Doug. I figured out yesterday that both MoveControl and
- SetDItem have to be used to move a control.
-
- --Jesse
- /
-
-
-
- ---------------------------
-
- From: Jim.Russell@p395.f70.n109.z1.FidoNet.Org (Jim Russell)
- Subject: Unloading Member Function Revisited (long)
- Date: 2 Feb 92 17:31:06 GMT
-
- Thanks for the excellent summary. I have yet to find an acceptable approach
- to unloading Think Class Library segments, but hope that I will find some
- hint based on the MPW approaches that were suggested to you. Of course, if
- someone has a TCL strategy to call UnloadSeg I would like to see it posted...
-
-
- * Origin: Two wrongs don't make a right - but 3 lefts will. (1:109/70.395)
-
-
-
- - -------------------------
-
- From: lsr@Apple.COM (Larry Rosenstein)
- Subject: Unloading Member Function Revisited (long)
- Date: 4 Feb 92 21:38:51 GMT
- Organization: Object Based Systems, Apple Computer, Inc.
-
- In article <1992Feb2.101419.15291@foretune.co.jp> trebor@foretune.co.jp (Robert J Woodhead) writes:
- >
- >Now, in your idle loop, or in any low memory recovery procedure you
- >care to define, you can safely set any segment with a count of zero
- >to be purgeable.
-
- You shouldn't just make the segments purgeable. You should call UnloadSeg
- to ensure that the jump table gets set to the unloaded state. Otherwise,
- you risk having the jump table point to code that isn't there.
-
- --
- Larry Rosenstein, Apple Computer, Inc.
-
- lsr@apple.com
- (or AppleLink: Rosenstein1)
-
-
-
- ---------------------------
-
- From: david@oahu.cs.ucla.edu (David Dantowitz)
- Subject: Does the SCSI Manager support devices that disconnect?
- Date: 3 Feb 92 16:37:45 GMT
- Organization: UCLA Computer Science Department
-
-
- The ANSI SCSI spec supports device disconnection, where the device
- disconnects and then reconnects to the bus when it is ready. I suppose
- this is most useful when there are multiple initiators, but I'm curious
- if anyone has used this with Macs.
-
- Thanks.
-
- --
- David Dantowitz
- david@cs.ucla.edu
-
- Singing Barbershop when I'm not computing...
-
-
-
- - -------------------------
-
- From: lemke@radius.com (Steve Lemke)
- Subject: Does the SCSI Manager support devices that disconnect?
- Date: 4 Feb 92 21:23:21 GMT
-
- david@oahu.cs.ucla.edu (David Dantowitz) writes:
-
-
- >The ANSI SCSI spec supports device disconnection, where the device
- >disconnects and then reconnects to the bus when it is ready. I suppose
- >this is most useful when there are multiple initiators, but I'm curious
- >if anyone has used this with Macs.
-
- The Macintosh SCSI Manager does *NOT* support disconnect and re-select.
-
- The only folks who really need this on a Mac are the SCSI Ethernet folks.
- Otherwise, without it their software would have to continuously poll the
- SCSI box to see if any incoming packets are waiting. Instead, they patch
- the SCSI Manager and implement their own flavor of disconnect and re-select
- so that the box can let the Mac know when packets are waiting.
-
- This has been done with varying degrees of success by Asante, Compatible
- Systems, and Dayna.
-
- --Steve
-
- --
- - --- Steve Lemke, KC6QDT - Software Engineering, Radius Inc., San Jose -----
- - --- Reply to: lemke@radius.com -- U.C. Santa Barbara ECE Class of '89 -----
- - --- "I'm not a UNIX wizard, but I play the Postmaster at radius.com." -----
-
-
-
- ---------------------------
-
- From: eckert@anduin.ocf.llnl.gov (Philip Eckert)
- Subject: Microsoft word format question
- Date: 3 Feb 92 21:55:25 GMT
- Organization: Lawrence Livermore Nat'l Lab.
-
- I was wondering, is their anyway that I can build a document on the Unix system
- and insert some kind of control characters to indicate Center Text, Underline
- Text, Bold etc., so that, when I send the file to my Mac and open it with
- Microsoft Word the correct things happen? Or are there possibly some macro
- files under UNIX for troff that convert to Microsoft Word format?
-
- Any sense of direction for approaching this would be appreciated.
-
-
-
- - -------------------------
-
- From: man@cs.brown.edu (Mark H. Nodine)
- Subject: Microsoft word format question
- Date: 4 Feb 92 15:49:23 GMT
- Organization: Brown Computer Science Dept.
-
- In article <117179@lll-winken.LLNL.GOV>, eckert@anduin.ocf.llnl.gov (Philip Eckert) writes:
- |> I was wondering, is their anyway that I can build a document on the Unix system
- |> and insert some kind of control characters to indicate Center Text, Underline
- |> Text, Bold etc., so that, when I send the file to my Mac and open it with
- |> Microsoft Word the correct things happen? Or are there possibly some macro
- |> files under UNIX for troff that convert to Microsoft Word format?
-
- There was an old program called MakeWrite that would accept as its input
- a text file with certain escape sequences (you could decide on your own)
- and create a MacWrite file with the right formatting information. It did
- not handle centered text, but it had all the text characteristics (italics, bold,
- etc.). The latest released version was 1.1; I hacked up a 1.2 version that
- included smart quotes, but I never got permission from the author to post it.
-
- Once you have a MacWrite file, of course, you can use Word's conversion
- utilities to make a Word file.
-
- --Mark
-
-
-
- - -------------------------
-
- From: ABSURD@applelink.apple.com (Tim Dierks, ToyMeister, Cray abuser)
- Subject: Microsoft word format question
- Date: 5 Feb 92 01:41:54 GMT
- Organization: MacDTS, Apple Computer
-
- In article <117179@lll-winken.LLNL.GOV>, eckert@anduin.ocf.llnl.gov (Philip Eckert) writes:
- >
- > I was wondering, is their anyway that I can build a document on the Unix system
- > and insert some kind of control characters to indicate Center Text, Underline
- > Text, Bold etc., so that, when I send the file to my Mac and open it with
- > Microsoft Word the correct things happen? Or are there possibly some macro
- > files under UNIX for troff that convert to Microsoft Word format?
- >
- > Any sense of direction for approaching this would be appreciated.
-
- You might want to look into the Microsoft RTF (Rich Text Format) specification.
- It's an entirely ASCII-based format for encoding this kind of information and
- more. I believe the spec is available from Microsoft. MS Word supports it;
- if you attempt to open a text and it guesses that this might be an RTF file
- (probably by looking at the first few lines), it asks you if you want to
- open it as RTF, in which case it's interpreted into a standard formatted
- Word document.
-
- Tim Dierks
- MacDTS, but I speak for myself
-
-
-
- - -------------------------
-
- From: GILMART@LSTC2VM.stortek.com (Paul Gilmartin)
- Subject: Microsoft word format question
- Date: 4 Feb 92 19:37:03 GMT
- Organization: StorageTek SW Engineering
-
- In article <117179@lll-winken.LLNL.GOV>
- eckert@anduin.ocf.llnl.gov (Philip Eckert) writes:
-
- >I was wondering, is their anyway that I can build a document on the Unix system
- >and insert some kind of control characters to indicate Center Text, Underline
- >Text, Bold etc., so that, when I send the file to my Mac and open it with
- >Microsoft Word the correct things happen? Or are there possibly some macro
- >files under UNIX for troff that convert to Microsoft Word format?
-
- Microsoft's preferred representation for interchange of Word documents as text
- is called RTF (Rich Text Format). There's an address in the Word Ref. Man.
- that you can write to for a copy of the RTF spec. I don't know of any existing
- troff to RTF filters, but I'd be optimistic -- it sounds like a common need.
-
-
-
- ---------------------------
-
- From: hennessy@acsu.buffalo.edu (Mathew A Hennessy)
- Subject: Sun .au format -> Mac sound format software?
- Date: 3 Feb 92 23:37:40 GMT
- Organization: UB
-
-
- This question probably pops up all the time, but I still need to
- know... is there a software application for the MAC which will read the .au
- format which the Sun handles? a Mac version is preferred because my unix
- account is permanently on the quota borderline but if only a unix program is
- available I guess I can make space 8)
- oh, and which is the best place to find good mac samples? looking for
- mostly startrek, clockwork orange, 2001, and Ren and Stimpy...
-
- thanx in advance,
-
-
- --
- +-------======++> Sen~or Biggles is hennessy@acsu.buffalo.edu <++=====--------+
- | "There's only one thing left for me to do, and that's | Mathew Hennessy |
- | to ding-a-ding dang my dang-a-long ling long!" | M-x insert-disclaimer |
- | - Ministry | |
-
-
-
- - -------------------------
-
- From: adiseker@chesapeake.ads.com (Andrew Diseker)
- Subject: .au => SoundEdit
- Date: 4 Feb 92 01:00:32 GMT
- Organization: Advanced Decision Systems division of Booz, Allen & Hamilton
-
-
- To save bandwidth, can someone send me a copy of the routine,
- preferably in C, to convert Sparcstation .au files into the format
- that SoundEdit uses? I'd really appreciate it.
-
-
-
-
- --
- Andrew Diseker Advanced Decision Systems
- USMail: 2111 Wilson Blvd Suite 800 Arlington VA 22201-3058
- Internet: adiseker@ads.com
- Phone: (703) 875-0308
-
-
-
- ---------------------------
-
- From: pascal@CAM.ORG (Pascal Gosselin)
- Subject: Alternate LAP support under MacTCP 1.1
- Date: 4 Feb 92 05:48:38 GMT
- Organization: Altitude, St-Lambert QC CANADA
-
- I have been told by someone that the Alternate LAP interface for
- MacTCP 1.1 is buggy. I downloaded the latest sample source from
- ftp.apple.com and the docs DO say that the Alternate LAP is untested
- and unsupported. Is it that bad?
-
- Comments, please!
-
-
- --
- +---------------------------------------------------------------------------+
- | Pascal Gosselin | Internet: pascal@CAM.ORG AppleLink: CDA0129 |
- | Omer DeSerres Informatique | Voice (514) 843-3082 Fax (514) 843-9327 |
- +---------------------------------------------------------------------------+
-
-
-
- - -------------------------
-
- From: amanda@visix.com (Amanda Walker)
- Subject: Alternate LAP support under MacTCP 1.1
- Organization: Visix Software, Inc.
- Date: Thu, 6 Feb 92 08:01:34 GMT
-
- In article <1992Feb4.054838.8555@CAM.ORG>, pascal@CAM.ORG (Pascal Gosselin)
- writes:
- > I have been told by someone that the Alternate LAP interface for
- > MacTCP 1.1 is buggy. I downloaded the latest sample source from
- > ftp.apple.com and the docs DO say that the Alternate LAP is untested
- > and unsupported. Is it that bad?
-
- It's more underdocumented than buggy, although there do seem to be a few
- bona fide bugs that show up under some conditions. These don't look like
- Alternate LAP bugs per se, just ones that aren't triggered by the built-in
- LAP modules for AppleTalk and Ethernet.
-
-
- Amanda Walker amanda@visix.com
- Visix Software Inc. ...!uunet!visix!amanda
- --
- "TARDIS Express: When it absolutely, positively, has to be there
- *before* you mailed it..."
-
-
-
-
- ---------------------------
-
- From: kacovert@miavx1.acs.muohio.edu
- Subject: Hiding Folders in Think C - again
- Date: 3 Feb 92 18:04:56 GMT
- Organization: Miami University Academic Computer Service
-
- I asked about this a couple of weeks ago and didn't get any response.
- Apparently, my post got lost, so I will ask again.
-
- I have written the following piece of code to toggle a file (in this example
- TEST) between being hidden and being visible. I would like to do the same for
- directories, but have had no luck. Could someone please help?
- An example would be great.
-
- BTW, this was written using Think C.
-
- #include <stdio.h>
- #include <Files.h>
- #include <pascal.h>
- main()
- {
- int OSErr;
- FInfo fndrInfo;
-
- if ((OSErr=GetFInfo("\pHard Disk:TEST",0,&fndrInfo)) != 0)
- { printf("Error in getting TEST information: %d\n",OSErr); }
- else
- { fndrInfo.fdFlags = fndrInfo.fdFlags ^ fInvisible;
- if ((OSErr=SetFInfo("\pHard Disk:TEST",0,&fndrInfo)) != 0)
- { printf("Error in changing TEST: %d\n",OSErr); }
- else
- { if ((fndrInfo.fdFlags & fInvisible) == fInvisible)
- printf("Control Panels is now invisible\n");
- else
- printf("Control Panels is now visible\n");
- }
- }
- }
-
- Any help would be appreciated.
-
- --
- Kent Covert
- Academic Computer Service
- Miami University, Oxford, OH
- kacovert@miavx1.acs.muohio.edu (internet)
- kacovert@miavx1 (bitnet)
-
-
-
- - -------------------------
-
- From: grobbins@Apple.COM (Grobbins)
- Subject: Hiding Folders in Think C - again
- Date: 5 Feb 92 10:02:46 GMT
- Organization: Apple DTS
-
- In article <1992Feb3.130457.8868@miavx1.acs.muohio.edu> kacovert@miavx1.acs.muohio.edu writes:
- >I have written the following piece of code to toggle a file (in this example
- >TEST) between being hidden and being visible. I would like to do the same for
- >directories, but have had no luck.
-
- First, the HI lecture: it's usually not nice to make files or folders
- invisible. If you need to create a temporary file or folder and you
- want it to remain unseen (and you're running under System 7) use
- FindFolder to locate the Temporary Items folder, and put your file or
- folder in there.
-
- Invisible files and folders can very easily fill up a hard drive and
- cause other confusing problems in a way which is quite difficult for
- most users to diagnose. There is almost always a better alternative to
- creating invisible items. I encourage you to describe why you want to
- create invisible files or folders, and we may be able to suggest an
- alternative which is less likely to have unpleasant side effects for
- users.
-
- > if ((OSErr=GetFInfo("\pHard Disk:TEST",0,&fndrInfo)) != 0)
-
- GetFInfo is only for obtaining Finder information on files, not on
- folders. Use the low-level call PBGetCatInfo (described in Inside Mac
- IV) instead to obtain information on directories, and PBSetCatInfo to
- change it.
-
- Also, that line uses a full pathname, which is strongly discouraged
- these days. Instead, always identify the location of a file or folder
- by the true vRefNum of the drive it resides upon (not the working
- directory refNum), the dirID of its parent folder, and its name. To
- get file info, use the HFS call HGetFInfo (documented in Inside Mac VI)
- and pass it those three input items instead.
-
- Obtaining vRefNums and dirIDs is not hard; for quick&dirty testing, you
- can use a vRefNum of -1 for your boot drive and the dirID 2 for
- anything in the root directory. In general, you'll get a dirID and
- vRefNum from FindFolder or by calling GetWDInfo on the WDRefNum (the
- "fake vRefNum") returned by SFGetFile/SFPutFile.
-
- Grobbins grobbins@apple.com
-
- Usual disclaimers apply.
-
-
-
- ---------------------------
-
- From: KURZAEV@JONATHAN.srcc.msu.su
- Subject: Think C 5.0 bug ?
- Date: 3 Feb 92 19:30:54 GMT
- Organization: Research Computing Center, Moscow State University
-
- Hello, world!
-
- I'm using Think C 5.0.1. I've a question.
-
- #define int(a) ((int)(a))
- #define long(b) ((long)(b))
-
- main() {
- int c;
- long d;
-
- c = int(c); /* this line is OK */
- d = long(d); /* this line is OK */
- d = long(int(c)); /* but this is NOT */
- }
-
- If I first preprocess this code, and then check syntax it's OK too.
- Is it a bug, or is it a feature?
-
- P.S. Think C 4.0.5 doesn't allow "c = int(c);" at all.
-
- Best regards,
- Paul Kurzaev
- Russia, Moscow University Computer Center
- AppleLink: MOSCOW.UNIV
- eMail: KURZAEV@JONATHAN.srcc.msu.su
-
-
-
- - -------------------------
-
- From: Carl.Constantine@BCSystems.GOV.BC.CA
- Subject: Think C 5.0 bug ?
- Date: 6 Feb 92 07:41:28 -0800
- Organization: BC Systems Corporation
-
- In article <832951013B@srcc.msu.su>, KURZAEV@JONATHAN.srcc.msu.su writes:
- > Hello, world!
- >
- > I'm using Think C 5.0.1. I've a question.
- >
- > #define int(a) ((int)(a))
- > #define long(b) ((long)(b))
- >
- > main() {
- > int c;
- > long d;
- >
- > c = int(c); /* this line is OK */
- > d = long(d); /* this line is OK */
- > d = long(int(c)); /* but this is NOT */
- > }
- >
- > If I first preprocess this code, and then check syntax it's OK too.
- > Is it a bug, or is it a feature?
- >
- > P.S. Think C 4.0.5 doesn't allow "c = int(c);" at all.
-
- You shouldn't use the int type on the Mac (or so I've been told by Thom Hogan
- and Kurt Mathies(sp??)). Instead use short to typecast your variables
-
- main()
- {
- short c;
- long d;
-
- c = short(c);
- d = long(d);
- d = long(short(c));
- }
-
- I'm not guaranteeing that this will work, but it's a start based on what I've
- been told about C programming on the Mac. Also, try to get the THINK C 5.0.2
- updater (with TCL 1.1.2) from Sumex [36.44.0.6].
-
- --
- Carl.Constantine@BCSystems.gov.bc.ca
- British Columbia, Canada
-
-
-
-
- ---------------------------
-
- From: canfield_rw@lrc.edu
- Subject: system calls
- Date: 4 Feb 92 07:08:46 GMT
- Organization: Lenoir-Rhyne College, Hickory, NC
-
- i have been looking through some of the gamemaster files in order to look
- at how the mac windows are created and manipulated during some simple game
- play (that is with out worying of the computer play) within the
- programs. while compiling the battleships rulebook - i got down to the battle-
- shipsdraw.unit and had trouble with the HGetState and HLock.
- writen as
- temp := HGetState(handle(windowPeek^.refcon));
- and
- HLock(Handle(windowPeek^.refcon));
- in the Draw procedure.
- errors reported as -- "HGetState" is not declared.
-
- they are both system calls declared as --
- function HGetState(theHandle :Handle) :signedByte;
- procedure HLock(theHandle :Handle);
-
- i am using lightspeed pascal and if anyone has any clue as to why this
- is occuring please email them to me.
-
- thanks.-
-
- ===============================================================================
-
- Raymond Canfield
-
- ____ ____ Ride the horn.
- / \
- |----| ----
- \____/ ____ KO 175
-
- Canfield_rw@lrc.edu
-
- ===============================================================================
-
-
-
- - -------------------------
-
- From: gurhs@uniwa.uwa.oz.au (Rhys Hollow)
- Subject: system calls
- Date: 5 Feb 92 07:37:44 GMT
- Organization: University of Western Australia
-
- canfield_rw@lrc.edu writes:
- : i have been looking through some of the gamemaster files in order to look
- : at how the mac windows are created and manipulated during some simple game
- : play (that is with out worying of the computer play) within the
- : programs. while compiling the battleships rulebook - i got down to the battle-
- : shipsdraw.unit and had trouble with the HGetState and HLock.
- : writen as
- : temp := HGetState(handle(windowPeek^.refcon));
- : and
- : HLock(Handle(windowPeek^.refcon));
- : in the Draw procedure.
- : errors reported as -- "HGetState" is not declared.
-
- First a question, is the above sample a direct copy, or is it typed in
- from memory. Because windowPeek is a TYPE not a pointer, and
- referencing it as a pointer is not going to work :) I would look at the
- rulebook sources, but I don't have them on me at the moment.
- Which version of Think Pascal are you using? If it is an old one,
- then it may not have the HGetState calls.
- Also, are you sure that it's the 'HGetState' not being declared? From
- what I know of Think Pascal error messages, usually it just points to
- the line and says 'One of these things confuses me'. It doesn't tell
- you which one. And a lot of the time the error messages are more
- confusing than the error. The error reporting DEFINITELY needs an
- overhaul.
- Hope this helps, hope it doesn't just confuse.
-
- Rhys.
- - -----------------------------------------------------------------------------
- Rhys Hollow (gurhs@uniwa.uwa.oz.au) "ee'er by gum he's a bad'un!" -DangerMouse.
-
-
-
- ---------------------------
-
- From: rrichter@link.ph.gmr.com (Roy Richter)
- Subject: ThinkC TCL Printer problem - too many strips
- Date: 4 Feb 92 14:05:32 GMT
- Organization: GM Research, Warren, Mi
-
- This is int the TCL 1.1.2 libraries.
- In CPanorama::Paginate, where the number of printer strips to
- break an image into is calculated, one finds:
-
- hStrips = PixWidth / pageWidth + 1;
- vStrips = PixHeight / pageHeight + 1;
-
- If your pane is exactly the size of the printed page, this returns
- 4 strips (2 horizontal and 2 vertical). A typical off-by-one error.
-
- Shouldn't it be:
-
- hStrips = PixWidth / (pageWidth + 1) + 1;
- vStrips = PixHeight / (pageHeight + 1) + 1;
-
-
- Is it me or is it TCL?
-
- --
- Roy Richter Internet: rrichter@ph.gmr.com
- Physics Dept, GM Research UUCP: rphroy!rrichter
-
- The yellow jester does not play but gently pulls the strings,
- and smiles as the puppets dance in the court of the crimson king.
-
-
-
- - -------------------------
-
- Subject: ThinkC TCL Printer problem - too many strips
- From: guelzow@brandonu.ca
- Date: 5 Feb 92 12:45:43 CST
- Organization: Brandon University, Brandon, Manitoba, Canada
-
- In article <76199@rphroy.ph.gmr.com>,
- rrichter@link.ph.gmr.com (Roy Richter) writes:
- > This is int the TCL 1.1.2 libraries.
- > In CPanorama::Paginate, where the number of printer strips to
- > break an image into is calculated, one finds:
- >
- > hStrips = PixWidth / pageWidth + 1;
- > vStrips = PixHeight / pageHeight + 1;
- >
- > If your pane is exactly the size of the printed page, this returns
- > 4 strips (2 horizontal and 2 vertical). A typical off-by-one error.
- >
- > Shouldn't it be:
- >
- > hStrips = PixWidth / (pageWidth + 1) + 1;
- > vStrips = PixHeight / (pageHeight + 1) + 1;
- >
- >
- > Is it me or is it TCL?
- It's both of you: As you pointed out, the TCL may print unneeded pages.
- Your calculation may yield hStrips and vStrips that are too small if
- PixW/H is much larger than pageW/H. Just imaged the extreme case:
- pageWidth = 1, PixWidth = 5. hStrips should be 5 but your calculation
- yields 3.
- Correct would be:
- hStrips = (PixWidth-1) / pageWidth + 1;
- vStrips = (PixHeight-1) / pageHeight + 1;
- (I think.)
- - -----------------------------------------------------------------------------
- Andreas Guelzow Dept. of Mathematics & Comp. Sc. Brandon University MB Canada
- Guelzow@BrandonU.Ca
-
-
-
- ---------------------------
-
- End of C.S.M.P. Digest
- **********************
-